const express = require("express");
const router = express.Router();
const Joi = require("joi");
const { share } = require("../services/shareService");

router.post("/share/create", function (req, res, next) {
  // const schema = Joi.object({
  //   id: Joi.string().required(),
  // });
  // // 使用schema来验证表单数据
  // const { error, value } = schema.validate({ ...req.body });
  // if (error) {
  //   return res.status(400).json({
  //     code: -1,
  //     data: null,
  //     msg: error.message,
  //   });
  // }
  share(req, res, next);
});
module.exports = router